package com.tpyg.wallet.account.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import com.tpyg.wallet.account.entity.ChatUser;
import com.tpyg.wallet.common.dao.IMybatisDao;

@Repository
public interface ChatUserMapper extends IMybatisDao<ChatUser, Long>{
    int deleteByPrimaryKey(Long id);

    int insert(ChatUser record);

    int insertSelective(ChatUser record);

    ChatUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ChatUser record);

    int updateByPrimaryKey(ChatUser record);
    
    
    /**
	 * 根据用户名和用户类型查找用户
	 * 
	 * @param username
	 * @return
	 */
    @Select("select * from chat_user where username = #{username}")
    ChatUser selectByUsername(@Param("username") String username);
}